package com.miles.pushups;

import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.TextView;

public class Week4Day2 extends Activity {
	private int level = 0;
	TextView set1;
	TextView set2;
	TextView set3;
	TextView set4;
	TextView maxset;
	@Override
    public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.info2);
	    SharedPreferences mySharedPreferences = getSharedPreferences("MY_PREFS",Activity.MODE_PRIVATE);	    	    
	    level = mySharedPreferences.getInt("level", 0);
	    set1 = (TextView)findViewById(R.id.set1);
	    set2 = (TextView)findViewById(R.id.set2);
	    set3 = (TextView)findViewById(R.id.set3);
	    set4 = (TextView)findViewById(R.id.set4);
	    maxset = (TextView)findViewById(R.id.maxset);
	    switch (level){
	    case (0):
		    set1.setText("set 1  -- 14");
		    set2.setText("set 2  -- 16");
		    set3.setText("set 3  -- 12");
		    set4.setText("set 4  -- 12");
		    maxset.setText("Max   -- 18");
		    break;
	    case (1):
		    set1.setText("set 1  -- 14");
		    set2.setText("set 2  -- 16");
		    set3.setText("set 3  -- 12");
		    set4.setText("set 4  -- 12");
		    maxset.setText("Max   -- 18");
	    	break;
	    case (2):
		    set1.setText("set 1  -- 14");
		    set2.setText("set 2  -- 16");
		    set3.setText("set 3  -- 12");
		    set4.setText("set 4  -- 12");
		    maxset.setText("Max   -- 18");
	    	break;
	    }
	}
}
